import Vue from 'vue'
import VueRouter from 'vue-router'
import Find from '../views/Find.vue'
import My from '../views/My.vue'
import Part from '../views/Part.vue'
import NotFound from '../views/NotFound.vue'

import Recommend from '../views/Second/Recommend.vue'
import Ranking from '../views/Second/Ranking.vue'
import SongList from '../views/Second/SongList.vue'

Vue.use(VueRouter)
const routes = [
    {
        path: '/',
        redirect: "/Find"
    },
    {
        path: "/find",
        component: Find,
        name: 'Find',
        children: [
            {
                path: 'recommend',
                component: Recommend
            },
            {
                path: 'ranking',
                component: Ranking
            }, {
                path: 'songList',
                component: SongList
            }
        ]
    },
    {
        path: "/my",
        component: My,
        name: 'My'
    },
    {
        path: "/part",
        component: Part,
        name: 'Part'
    },
    {
        path: "/part/:name",
        component: Part
    },
    {
        path: '*',
        component: NotFound
    }
]
const router = new VueRouter({
    routes
})
export default router